programming4us
           
 
 
Windows Phone

Programming Windows Phone 7 : A First Silverlight Phone Program

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
12/24/2010 2:50:29 PM
In the New Project dialog box, on the left under Installed Templates, choose Visual C# and then Silverlight for Windows Phone. In the middle area, choose Windows Phone Application. Select a location for the project, and enter the project name: SilverlightHelloPhone.

As the project is created you’ll see an image of a large-screen phone in portrait mode with a screen area 480 x 800 pixels in size. This is the design view. Although you can interactively pull controls from a toolbox to design the application, I’m going to focus instead on showing you how to write your own code and markup.

Several files have been created for this SilverlightHelloPhone project and are listed under the project name in the Solution Explorer over at the right. In the Properties folder are three files that you can usually ignore when you’re just creating little sample Silverlight programs for the phone. Only when you’re actually in the process of making a real application do these files become important.

However, you might want to open the WMAppManifest.xml file. In the App tag near the top, you’ll see the attribute:

Title="SilverlightHelloPhone"

That’s just the project name you selected. Insert some spaces to make it a little friendlier:

Title="Silverlight Hello Phone"

This is the name used by the phone and the phone emulator to display the program in the list of installed applications presented to the user. If you’re really ambitious, you can also edit the ApplicationIcon.png and Background.png files that the phone uses to visually symbolize the program. The SplashScreenImage.jpg file is what the program displays as it’s initializing.

In the standard Visual Studio toolbar under the program’s menu, you’ll see a drop-down list probably displaying “Windows Phone 7 Emulator.” The other choice is “Windows Phone 7 Device.” This is how you deploy your program to either the emulator or an actual phone connected to your computer via USB.

Just to see that everything’s working OK, select Windows Phone 7 Emulator and press F5 (or select Start Debugging from the Debug menu). Your program will quickly build and in the status bar you’ll see the text “Connecting to Windows Phone 7 Emulator…” The first time you use the emulator during a session, it might take a little time to start up. If you leave the emulator running between edit/build/run cycles, Visual Studio doesn’t need to establish this connection again.

Soon the phone emulator will appear on the desktop and you’ll see the opening screen, followed soon by this little do-nothing Silverlight program as it is deployed and run on the emulator. On the phone you’ll see pretty much the same image you saw in the design view.



The phone emulator has a little floating menu at the upper right that comes into view when you move the mouse to that location. You can change orientation through this menu, or change the emulator size. By default, the emulator is displayed at 50% actual size, about the same size as the image on this page. When you display the emulator at 100%, it becomes enormous, and you might wonder “How will I ever fit a phone this big into my pocket?”

The difference involves pixel density. Your computer screen probably has about 100 pixels per inch. (By default, Windows assumes that screens are 96 DPI.) The screen on an actual Windows Phone 7 device is more than 2½ times that. When you display the emulator at 100%, you’re seeing all the pixels of the phone’s screen, but at about 250% their actual size.

You can terminate execution of this program and return to editing the program either though Visual Studio (using Shift-F5 or by selecting Stop Debugging from the Debug menu) or by clicking the Back button on the emulator.

Don’t exit the emulator itself by clicking the X at the top of the floating menu! Keeping the emulator running will make subsequent deployments go much faster.

While the emulator is still running, it retains all programs deployed to it. If you click the arrow at the upper-right of the Start screen, you’ll get a list that will include this program identified by the text “Silverlight Hello Phone” and you can run the program again. The program will disappear from this list when you exit the emulator.

If you have a Windows Phone 7 device, you’ll need to register for the marketplace at the Windows Phone 7 portal, http://developer.windowsphone.com. After you’re approved, you’ll to connect the phone to your PC and run the Zune desktop software. You can unlock the phone for development by running the Windows Phone Developer Registration program and entering your Windows Live ID. You can then deploy programs to the phone from Visual Studio.

Other -----------------
- Programming Windows Phone 7 : Sensors and Services
- Programming Windows Phone 7 : The Hardware Chassis
- Windows Phone 7 : Deleting Music or Video
- Windows Phone 7 : Pinning Favorites to Start
- Windows Phone 7 : Listening to FM Radio
- Windows Phone 7 : Playing Podcasts
- Windows Phone 7 : Watching Videos
- Windows Phone 7 : Controlling Music Playback
- Windows Phone 7 : Playing Music
- Windows Phone 7 : Pinning a Favorite Place to Start
- Windows Phone 7 : Adding a Pushpin
- Windows Phone 7 : Changing Map Views
- Windows Phone 7 : Sharing an Address with Someone
- Windows Phone 7 : Getting Real-Time Traffic Conditions
- Windows Phone 7 : Getting Directions
- Windows Phone 7 : Seeing What’s Nearby
- Windows Phone 7 : Finding Places and Things
- Windows Phone 7 : Finding Yourself
- Windows Phone 7 : Working with Maps
- Developing for Windows Phone and Xbox Live : 3D Math Basics (part 2) - Vectors in 3D graphics
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us